<?php
/**
 *
 * @author     Daniel Botelho <botelho.daniel@gmail.com>
 */
class FlashObject
{
  private $url;
  private $flash_params;
  private $flash_version;
  
  /**
   * @param string $url This the URL or the variable to the URL. This deppends on $variable value
   * @param int $flash_version This is the flash version. By default is 9
   * @param boolean $variable If true, the $url is a variable point to the url, if false, it's the actually URL
   */
  public function __construct($url,$flash_version = 9,$variable=false)
  {
  	if($variable)
  	  $this->setURL($url);
  	else
  	  $this->setURL("'".$url."'");
  	  
  	$this->setFlashVersion($flash_version);
    $this->flash_params = array();
  }
  public function setURL($url){ return $this->url = $url; }
  public function getURL() { return $this->url; }
  public function addParam($key,$value)
  {
  	$this->flash_params[$key] = $value;
  }
  public function getParam($key)
  {
  	return $this->flash_params[$key];
  }
  public function getFlashVersion(){ return $this->flash_version; }
  public function getParams() { return $this->flash_params; }
  public function setFlashVersion($flash_version) { $this->flash_version = $flash_version; }
}